package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbHouseInfoMapper;
import com.ruoyi.system.domain.TbHouseInfo;
import com.ruoyi.system.service.ITbHouseInfoService;

/**
 * 房屋详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class TbHouseInfoServiceImpl implements ITbHouseInfoService 
{
    @Autowired
    private TbHouseInfoMapper tbHouseInfoMapper;

    /**
     * 查询房屋详情
     * 
     * @param houseId 房屋详情主键
     * @return 房屋详情
     */
    @Override
    public TbHouseInfo selectTbHouseInfoByHouseId(Long houseId)
    {
        return tbHouseInfoMapper.selectTbHouseInfoByHouseId(houseId);
    }

    /**
     * 查询房屋详情列表
     * 
     * @param tbHouseInfo 房屋详情
     * @return 房屋详情
     */
    @Override
    public List<TbHouseInfo> selectTbHouseInfoList(TbHouseInfo tbHouseInfo)
    {
        return tbHouseInfoMapper.selectTbHouseInfoList(tbHouseInfo);
    }

    /**
     * 新增房屋详情
     * 
     * @param tbHouseInfo 房屋详情
     * @return 结果
     */
    @Override
    public int insertTbHouseInfo(TbHouseInfo tbHouseInfo)
    {
        tbHouseInfo.setCreateTime(DateUtils.getNowDate());
        return tbHouseInfoMapper.insertTbHouseInfo(tbHouseInfo);
    }

    /**
     * 修改房屋详情
     * 
     * @param tbHouseInfo 房屋详情
     * @return 结果
     */
    @Override
    public int updateTbHouseInfo(TbHouseInfo tbHouseInfo)
    {
        tbHouseInfo.setUpdateTime(DateUtils.getNowDate());
        return tbHouseInfoMapper.updateTbHouseInfo(tbHouseInfo);
    }

    /**
     * 批量删除房屋详情
     * 
     * @param houseIds 需要删除的房屋详情主键
     * @return 结果
     */
    @Override
    public int deleteTbHouseInfoByHouseIds(Long[] houseIds)
    {
        return tbHouseInfoMapper.deleteTbHouseInfoByHouseIds(houseIds);
    }

    /**
     * 删除房屋详情信息
     * 
     * @param houseId 房屋详情主键
     * @return 结果
     */
    @Override
    public int deleteTbHouseInfoByHouseId(Long houseId)
    {
        return tbHouseInfoMapper.deleteTbHouseInfoByHouseId(houseId);
    }
}
